package Try;

import java.util.Scanner;

public class Test7 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        System.out.println(f1(a));
    }

    private static int f1(int a) {
        int count = 0;
        while (a != 0) {
            if (a % 2 == 1) {
                count++;
            }
            a /= 2;
        }
        return count;
    }
}
